<?php
/**
 * Created by PhpStorm.
 * User: 764432054@qq.com
 * Date: 2020/3/4
 * Time: 14:35
 */
include  './init.php';
$pipe=createPipe();

$f = fopen($pipe,"w");

while($r=fread(STDIN,2)){
    $wlen=fwrite($f,$r);//block until there is a reader
    var_dump($r);
    if(stripos($r,'by')!==false){
        break;
    }
}


#unlink($pipe); //delete pipe
